ref class Account
{
public:
	static String^ ConvertServerToTime(double srvTime);
	static String^ ConvertServerToDate(double srvTime);

	void AddToLog(String ^subject, String ^info);

	AxTWSLib::AxTws ^TwsControl(){ return twsControl; }
	List<String^> ^Log(){ return log; }
	
	int GetNextFreeID();
	int GetNextFreeOrderID();
	Account(AxTWSLib::AxTws ^twsControl);

protected:
	AxTWSLib::AxTws ^twsControl;
	List<String^> ^log;
	int nextFreeID;
	int nextFreeOrderID;

	void updateNextFreeOrderID(System::Object ^sender, AxTWSLib::_DTwsEvents_nextValidIdEvent ^e);
};